#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n, m, k, i, count = 0, out = 0, a[101] = { 0 }, b[100] = { 0 };
	scanf("%d %d %d", &n, &m, &k);  

	while (out < n)  //当还有人未出圈时,循环继续
	{
		if (a[k] == 0)  //若编号为k的人未出圈
		{
			count++;
			if (count == m)  //报数达到最大值
			{
				a[k] = 1;  //编号为k的人出圈
				b[out++] = k;  //记录出圈人的编号
				count = 0;
			}
		}
		k++;
		if (k == n + 1)  //报数一圈完毕,从头再来一圈
			k = 1;
	}

	for (i = 0; i < n; i++)  //按出圈的顺序打印出圈人的编号
		printf("%3d", b[i]);
	return 0;
}